(function(angular) {
	'use strict';
	angular.module("fs.waf").factory("resourceBundleService", sampleCompanyService);
	sampleCompanyService.$inject = [ '$q', 'loggerFactory', 'commonService', 'ajaxServiceFactory', 'modalService', 'gridService' ];
	function sampleCompanyService($q, loggerFactory, commonService, ajaxServiceFactory, modalService, gridService) {
		var log = loggerFactory.getLogger("resourceBundleService"), ajaxService = ajaxServiceFactory.buildAjaxService({
			getResourceBundleScope : {
				url : 'do/cda/dataList/resourceBundleScope',
				method : 'get'
			},
			getlocaleCodeOptions : {
				url : 'do/cda/dataList/getlocaleCodeOptions',
				method : 'get'
			},
			getLocaleAll : {
				url : 'do/cda/dataList/localeAll',
				method : 'post'
			}
		});
		function getResourceBundleScopeOptions() {
			var defer = $q.defer();
			ajaxService.getResourceBundleScope().then(function(response) {
				defer.resolve(response);
			});
			return defer.promise;
		}
		function getLocaleAllOptions() {
			var defer = $q.defer();
			ajaxService.getLocaleAll().then(function(response) {
				defer.resolve(response);
			});
			return defer.promise;
		}
		function getlocaleCodeOptions(scope) {
			var defer = $q.defer();
			if(scope){
				ajaxService.getlocaleCodeOptions({"scope":scope}).then(function(response) {
					defer.resolve(response);
				});
			}else{
				defer.resolve();
			}
			return defer.promise;
		}
		return {
			getResourceBundleScopeOptions : getResourceBundleScopeOptions,
			getLocaleAllOptions : getLocaleAllOptions,
			getlocaleCodeOptions : getlocaleCodeOptions
		};
	}
})(angular);